package com.usian.common.untils;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @projectName: day05_mohongwei_parent
 * @package: com.jiyun.common.untils
 * @className: GlobalExceptionHandler
 * @author: 莫洪维
 * @email: 1204315800@qq.com
 * @description: TODO
 * @date: 2023/8/25 21:00
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(value = Exception.class)
    public void myException(Exception e){
        System.out.println("异常处理器生效");
        e.printStackTrace();
    }
}
